package com.zyx.xunyilu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zyx.xunyilu.enums.ReleaseEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @ClassName: Article
 * @author: zyx
 * @E-mail: 1377631190@qq.com
 * @DATE: 2019/11/28 19:58
 */
@Data
@TableName(value = "article", resultMap = "com.zyx.xunyilu.mapper.ArticleMapper.baseMap")
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class Article {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer fId;

    private String  title;

    private String  content;

    private Integer goods;

    private ReleaseEnum flag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date    time;

    @TableField(exist = false)
    private User    user;

}
